<?php $this->pageTitle = Yii::app()->name . ' - ' . UserModule::t("Registration");
?>
<div class="span6">
    <div class="box">
        <h4 class="notice-title"><?php echo UserModule::t("Đăng ký"); ?></h4>
        <?php if (Yii::app()->user->hasFlash('registration')): ?>
            <div class="success">
                <?php echo Yii::app()->user->getFlash('registration'); ?>
            </div>
        <?php else: ?>

            <div class="notice">
                <?php
                $form = $this->beginWidget('UActiveForm', array(
                    'id' => 'registration-form',
                    'enableAjaxValidation' => true,
                    'disableAjaxValidationAttributes' => array('RegistrationForm_verifyCode'),
                    'htmlOptions' => array('enctype' => 'multipart/form-data', 'class' => 'form-horizontal'),
                ));
                ?>
                <?php echo $form->errorSummary(array($model, $profile)); ?>
                <div class="control-group">
                    <?php echo $form->labelEx($model, 'username', array('class' => 'control-label')); ?>
                    <div class="controls">
                        <?php echo $form->textField($model, 'username'); ?>
                        <?php echo $form->error($model, 'username'); ?>
                    </div>
                </div>

                <div class="control-group">
                    <?php echo $form->labelEx($model, 'password', array('class' => 'control-label')); ?>
                    <div class="controls">
                        <?php echo $form->passwordField($model, 'password'); ?>
                        <?php echo $form->error($model, 'password'); ?>
                        <p class="hint">
                            <?php echo UserModule::t("Minimal password length 4 symbols."); ?>
                        </p>
                    </div>
                </div>

                <div class="control-group">
                    <?php echo $form->labelEx($model, 'verifyPassword', array('class' => 'control-label')); ?>
                    <div class="controls">
                        <?php echo $form->passwordField($model, 'verifyPassword'); ?>
                        <?php echo $form->error($model, 'verifyPassword'); ?>
                    </div>
                </div>

                <div class="control-group">
                    <?php echo $form->labelEx($model, 'email', array('class' => 'control-label')); ?>
                    <div class="controls">
                        <?php echo $form->textField($model, 'email'); ?>
                        <?php echo $form->error($model, 'email'); ?>
                    </div>
                </div>

                
                <div class="form-actions">
                    <?php echo CHtml::submitButton(UserModule::t("Đăng ký"), array('class' => 'btn btn-success')); ?>
                </div>

                <?php $this->endWidget(); ?>
            </div><!-- form -->
        <?php endif; ?>
    </div>
</div>
<div class="span6"></div>